package day03;

public class MainTest5 {
    public static void main(String[] args) {
        //1~~~100的和
        int sum = 0;
        for (int num = 1; num <= 100; num++) {
            sum = sum + num;
        }
        System.out.println(sum);


        //题目1~100的偶数和
        int sum1 = 0;
        for (int num1 =0; num1 <= 100; num1 =num1+2 ) {
            sum1 = sum1 +num1;
        }
        System.out.println(sum1);

    }
}